<template>
  <div>
    <div style="text-align:center">
      <el-upload
        action="http://localhost:8888/recognition/plant"
        list-type="picture-card"
        :on-success="successHandler">
        <i class="el-icon-plus"></i>
      </el-upload>
    </div>

    <div>
      <h3>识别结果：</h3>
      <el-table :data="resp.result">
        <el-table-column label="精确度" align="center" prop="score"></el-table-column>
        <el-table-column label="分类" align="center" prop="root"></el-table-column>
        <el-table-column label="关键字" align="center" prop="keyword"></el-table-column>
      </el-table>
    </div>
  </div>
  
</template>
<script>
export default {
  data(){
    return {
      resp :{}
    }
  },
  methods:{
    successHandler(resp){
      this.resp = resp;
    }
  }
}
</script>
<style lang="sass" scoped>

</style>